package com.zheng.security.exception;

import lombok.Getter;

/**
 * @author zyq
 * @Description 自定义异常类
 * @createTime 2021年01月15日 17:00:00
 */
@Getter
public class ApiException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private final Integer code;

    public ApiException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public ApiException(String str){
        super(str);
        this.code = 500;
    }
}